fix(query-devtools/PiPContext): reset 'pip_open' in 'localStore' from 'closePipWindow' so the auto-open createEffect does not reopen the window after a programmatic close#10813
Conversation
… 'closePipWindow' so the auto-open createEffect does not reopen the window after a programmatic close
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe PR fixes a Picture-in-Picture (PiP) lifecycle issue in query-devtools. When ChangesPiP Window Close State Reset
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
View your CI Pipeline Execution ↗ for commit d109f04
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version Preview2 package(s) bumped directly, 23 bumped as dependents. 🟩 Patch bumps
|
size-limit report 📦
|
🎯 Changes
PiPContextexposes two paths that close the PiP window:pagehidelistener installed insiderequestPipWindow— fires when the user closes the popup from the browser/OS chrome. It writespip_open = 'false'tolocalStoreand resets thepipWindowsignal.closePipWindowreturned fromusePiPWindow()— for callers that need to close the popup programmatically. Until this change it only reset thepipWindowsignal, leavingpip_openas'true'inlocalStore.The asymmetry is observable on the next mount: the auto-open
createEffectreadspip_open === 'true'and reopens the popup the caller just closed. The two paths describe the same intent ("the PiP window is no longer open"), so they should converge on the same cleanup.Mirror the
pagehidecleanup insideclosePipWindowby writingpip_open = 'false'before clearing the signal. The addedPiPContext.test.tsxcase asserts thatlocalStorage['TanstackQueryDevtools.pip_open']flips to'false'afterclosePipWindow()so the regression fails loudly if the write is dropped again.✅ Checklist
🚀 Release Impact
Summary by CodeRabbit
Release Notes